/**
 * getOwnPropertyNames()方法获取指定对象的所有属性名返回组成的数组
 **/
var o = {}
Object.defineProperties(o, {
    'name': {
        value       : '骆泽熙',
        enumerable  : true,
        configurable: true,
        writable    : true
    },
    'sex' : {
        value       : '男',
        enumerable  : true,
        configurable: true,
        writable    : true
    }
});

var obj = Object.getOwnPropertyNames(o);
console.log(obj);//['name','sex']

var per = {0: "a", 1: "b", 2: "c", 3: "d"}
console.log(Object.getOwnPropertyNames(per));//获取per对象的所有属性名  ['0','1','2','3']